<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Config</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Config</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The configuration system of Nexista is XML based and is designed to allow for  multiple modes (i.e live, development, etc...).</p>
		<p class="notes">
			Located in <a class="field" href="_kernel---config.php.html">/kernel/config.php</a> (line <span class="field">23</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
												<div class="var-title">
					static <span class="var-type">string</span>
					<a href="#$mode" title="details" class="var-name">$mode</a>
				</div>
																<div class="var-title">
					static <span class="var-type">object</span>
					<a href="#$xml" title="details" class="var-name">$xml</a>
				</div>
																															</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																				<div class="method-definition">
					static 						<span class="method-result">mixed</span>
										<a href="#get" title="details" class="method-name">get</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">void</span>
										<a href="#getMode" title="details" class="method-name">getMode</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">0</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">array</span>
										<a href="#getSection" title="details" class="method-name">getSection</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span> = <span class="var-default">false</span>])
									</div>
																																																								<div class="method-definition">
					static 						<span class="method-result">void</span>
										<a href="#setMode" title="details" class="method-name">setMode</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$mode</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">object class</span>
										<a href="#singleton" title="details" class="method-name">singleton</a>
										()
									</div>
																<div class="method-definition">
					static 						<span class="method-result">void</span>
										<a href="#writeConfig" title="details" class="method-name">writeConfig</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$config</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$config_filename</span>)
									</div>
								
												<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#customizeEntities" title="details" class="method-name">customizeEntities</a>
										()
									</div>
																																								<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#load" title="details" class="method-name">load</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#loadMasterConfig" title="details" class="method-name">loadMasterConfig</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#returnMasterConfig" title="details" class="method-name">returnMasterConfig</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setLocal" title="details" class="method-name">setLocal</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setMaster" title="details" class="method-name">setMaster</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
									</div>
																																</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$mode" id="$mode"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			static <span class="var-type">string</span>
			<span class="var-name">$mode</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">59</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Config mode/environment</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$xml" id="$xml"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			static <span class="var-type">object</span>
			<span class="var-name">$xml</span>
						(line <span class="line-number">68</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">SimpleXML root object of merged master/local</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodget" id="get"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method get</span> (line <span class="line-number">291</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Retrieves a config value</p>
<p class="description"><p>Retrieves a value for a config variable. If a mode is set  it will attempt to get the value for this variable in the preferred mode.  If nothing is found, it will then attempt to retrieve the default value in the  local config file and will finally look for the default master value.  Note that this method makes use of xpath and adds on the mode criteria</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> value or null if not found</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">mixed</span>
		<span class="method-name">
			get
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: variable path</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetMode" id="getMode"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method getMode</span> (line <span class="line-number">141</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Retrieves the current mode</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">void</span>
		<span class="method-name">
			getMode
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">0</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">0</span><span class="var-description">: mode</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetSection" id="getSection"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method getSection</span> (line <span class="line-number">331</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Retrieves a config section</p>
<p class="description"><p>Retrieves an array of values for a config section. If a mode is set  it will attempt to get the value for these variable in the preferred mode.  If nothing is found, it will then attempt to retrieve the default value in the  local config file and will finally look for the default master value.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> empty if nothing found</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">array</span>
		<span class="method-name">
			getSection
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$id</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: section path</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$id</span><span class="var-description">: section id when using multiple sections with same name</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetMode" id="setMode"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method setMode</span> (line <span class="line-number">128</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets the configuration mode</p>
<p class="description"><p>A mode is set in the config files for each entry in case of multiple  entries of the same type that may be used in different environment  such as live, dev, debug mode.  This mode, which is optional but if given it will be used by the config  process to determine which entry to retrieve.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">void</span>
		<span class="method-name">
			setMode
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$mode</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$mode</span><span class="var-description">: mode</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsingleton" id="singleton"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method singleton</span> (line <span class="line-number">388</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a class singleton.</p>
	<ul class="tags">
				<li><span class="field">return:</span> singleton instance</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">object class</span>
		<span class="method-name">
			singleton
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodwriteConfig" id="writeConfig"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method writeConfig</span> (line <span class="line-number">254</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Writes a combined config file for runtime</p>
<p class="description"><p>The master config and optional local config are output as a combined xml file  that is used by the runtime system</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">void</span>
		<span class="method-name">
			writeConfig
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$config</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$config_filename</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$config</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$config_filename</span>			</li>
				</ul>
		
			
	</div>

<a name="methodcustomizeEntities" id="customizeEntities"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">customizeEntities</span> (line <span class="line-number">228</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Open entities skeleton and set table prefix.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			customizeEntities
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodload" id="load"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">load</span> (line <span class="line-number">156</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Reads and parses all config data</p>
<p class="description"><p>Reads the master and optional local config file into a common  simpleXML object</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			load
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodloadMasterConfig" id="loadMasterConfig"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">loadMasterConfig</span> (line <span class="line-number">200</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Reads the master</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			loadMasterConfig
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodreturnMasterConfig" id="returnMasterConfig"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">returnMasterConfig</span> (line <span class="line-number">214</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return master config simple xml object</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			returnMasterConfig
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetLocal" id="setLocal"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setLocal</span> (line <span class="line-number">105</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets the local override application config data</p>
<p class="description"><p>This method accepts a local config file that can be used to: <ol><li>override master config settings</li><li>create custom settings that can later be accessed in the standard manner</li></ol></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setLocal
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span><span class="var-description">: path to xml config file</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetMaster" id="setMaster"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setMaster</span> (line <span class="line-number">83</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets the master application config data</p>
<p class="description"><p>This method loads the config data that holds the applciation  parameters such as paths, location of sitemap,  session preferences, db connections, etc...  Some of this data will be written directly in the gate files  during the compile process.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setMaster
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span><span class="var-description">: path to xml config file</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Thu, 02 Aug 2007 17:35:16 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
	</p>
	</div></body>
</html>